﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using System.Diagnostics;

namespace ActiveOnline
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            #region Just one  instance run
            if (Debugger.IsAttached == false)
            {
                Process thisProcess = Process.GetCurrentProcess();
                foreach (Process p in Process.GetProcessesByName(thisProcess.ProcessName))
                {
                    if (p.Id != thisProcess.Id)
                    {
                        // Shut Down
                        Application.Current.Shutdown();
                        return;
                    }
                }
            }
            #endregion

            Xceed.Wpf.Controls.Licenser.LicenseKey = "DGP35-MU2N5-LPM88-9K2A";
        }
    }
}
